<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8 echo CHARSET?>" />
	<link rel="stylesheet" href="css/common.css" type="text/css" />
	<script language="javascript" src="js/jquery-1.4.2.min.js"></script>
	<title>商家列表</title>
</head>

<body>
<div id="man_zone">

  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1">
    <tr>
    	<form id="seach" name="seach" method="get" action="">
	      	<td align="right">
	        	&nbsp;團購ID：<input name="gid" type="text" id="gid" size="15" /> 
	        	&nbsp;會員ID：<input name="uid" type="text" id="uid" size="15" />
	        	訂單編號：<input name="order_sn" type="text" id="order_sn" size="15" />
				未收款<input type="checkbox" name="money_state" value="no" >
	        	&nbsp;<input type="submit" name="Submit3" value="搜索" />
      	</form>
	  </td>
    </tr>
  </table>
<form method="post" action="?action=dels" name="grouplist" id="grouplist">
  <table width="99%" align="center"  border="0" cellpadding="3" cellspacing="1" class="table_style">
    <tr>
      <th width="4%">編號</th>
      <th width="9%">訂單編號 </th>
      <th width="20%">團購名稱</th>
      <th width="12%">下單時間</th>
	  <th width="3%">數量</th>
      <th width="5%">訂單金額</th>
      <th width="3%">以收金額</th>
      <th width="6%">會員帳號</th>
      <th width="4%">收款狀態</th>
      <th width="4%">發貨狀態</th>
	  <th width="19%">發票</th>
	  <th>來源</th>
      <th width="16%">操作</th>
    </tr>
	<?php if(is_array($dataarray)){
	
	foreach($dataarray as $value){?>
	    <tr class="odd_row">
	      <td align="center"><?php echo $value['oid']?></td>
	      <td><?php echo $value['order_sn']?>&nbsp;</td>
	      <td><?php echo $value['gtitle']?></td>
	      <td><?php if($value['order_addtime']!=0)echo date("Y-m-d H:i",$value['order_addtime'])?>&nbsp;&nbsp;</td>
	      <td><?php echo $value['num']?></td>
	      <td><?php echo $value['order_total_price']?></td>
	      <td><?php echo $value['order_incharge']?></td>	  
	      <td><?php echo $value['uname']?>&nbsp;</td>	  
	      <td><?php echo $_CONFIGS['money_state'][$value['money_state']]?></td>
	      <td><?php echo $_CONFIGS['shipping_state'][$value['shipping_state']]?></td>	  
		  <td><?php echo $value['tmp']?></td>
		  <td><?php echo $value['referer']?></td>
	      <td>
			   <?php
			  if($value['money_state']!==2){
			  ?>
			  <a href="javascript:if(confirm('確定要從用戶帳戶餘額扣款嗎?'))location='order_list.php?action=money&amp;oid=<?php echo $value['oid']?>'">[點擊收款]</a><br/>
			  <?php }?>
			  <?php
			  if($value['shipping_state']==0){
			  ?>
			  <a href="order_list.php?action=send&amp;oid=<?php echo $value['oid']?>">[發貨操作]</a>
			  <a href="javascript:if(confirm('確定退款嗎?'))location='order_list.php?action=refund&amp;oid=<?php echo $value['oid']?>'">[點擊退款]</a><br/>
			  <?php }?>
		  </td>
	    </tr>
	<?php }}else{?>
		<tr><td colspan=10>暫無數據..............</td></tr>
	<?php };?>
  </table>
  

  <div style="width:99%;margin:0px auto;">

  
    <?php echo multi($total,$pagesize,$page,"");?>
  </div>
  </form>
</div>
</body>
</html>
